Last chance! 50% off unlimited learning
Sale ends in
mmhc.skel(dataset, max_k = 3, threshold = 0.05, test = "testIndFisher", rob = FALSE,
fast = FALSE, symmetry = TRUE, nc = 1, graph = FALSE)
A trick mentioned in that paper to make the procedure faster is the following. In the k-th variable, the algorithm checks how many previously scanned variables have an edge with the this variable and keeps them (it discards the other variables with no edge) along with the next (unscanned) variables.
This trick reduces time, but can lead to different results. For example, if the i-th variable is removed, the k-th node might not remove an edge between the j-th variable, simply because the i-th variable that could d-sepate them is missing.
The user is given this option via the argument "fast", which can be either TRUE or FALSE. Parallel computation is also available.
SES, MMPC, pc.skel
# simulate a dataset with continuous data
dataset <- matrix(runif(1000 * 50, 1, 100), nrow = 1000 )
a1 <- mmhc.skel(dataset, max_k = 3, threshold = 0.05, test = "testIndFisher",
rob = FALSE, nc = 1)
a2 <- mmhc.skel(dataset, max_k = 3, threshold = 0.05, test = "testIndSpearman",
rob = FALSE, nc = 1)
a3 <- pc.con(dataset)
a4 <- pc.skel(dataset, R = 1)
a1$runtime
a2$runtime
a3$runtime
Run the code above in your browser using DataLab